package org.example.adapter.objectadapter;

/**
 * @author wangbin
 * @date 2024/4/17
 * @vesion 1.0
 */
public class VoltageAdapter implements IVolltag5V {

    private  Voltage220V voltage220V;

    public VoltageAdapter(Voltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }

    @Override
    public int outPut5V() {
        System.out.println("进入5V降压环节");
        int srcv=0;
        if(null!=voltage220V){
            System.out.println(" voltage220V进入5V降压环节");

            srcv = voltage220V.outPut220V();
        }
        System.out.println("降压使用");
        srcv=srcv/40;
        return srcv;
    }
}
